import React from 'react'

//医生列表
export async function apiDoctorPage(params) {
  return await React.$post('/management/yDoctorInfo/page', params);
}
//新增医生
export async function apiAddDoctor(params) {
  // return await React.$post('/management/yDoctorInfo', params);
  return await React.$postJson('/user/api/b/doctorInfo/addDoctor', params);
}
//修改医生
export async function apiEditDoctor(params) {
  // return await React.$put('/management/yDoctorInfo', params);
  return await React.$postJson('/user/api/b/doctorInfo/editDoctor', params);
}
//删除医生
export async function apiDeleteDoctor(id) {
  return await React.$delete(`/management/yDoctorInfo/${id}`);
}
//禁用或启用医生
export async function apiSwitchDoctor(params) {
  return await React.$post('/management/yDoctorInfo/switchDoctor', params);
}

// 查看详情
export async function apiViewDoctor(id) {
  // return await React.$get(`/management/yDoctorInfo/${id}`);
  return await React.$get(`/user/api/b/doctorInfo/getById?doctorId=${id}`);
}
//退单列表
export async function apiGetReturnOrderDetails(params) {
  return await React.$post('/management/hospitalSalesReturn/page', params);
}
//退单列表-订单详情
export async function apiGetOrderDetails(params) {
  return await React.$get(`/management/hospitalSalesReturn/getHospitalSalesReturnDetail`,params);
}
//退单列表-同意退款|拒绝退款
export async function apiOrderRefundRefuse(params) {
  return await React.$post('/management/hospitalSalesReturn/disposeRefund', params);
}
//查询预约日期列表
export async function apiSubscribeDatePage(params) {
  return await React.$post('/user/api/b/doctorSchedule/preview', params);
}
